package kr.co.hk.coupon;

import kr.co.hk.R;
import android.app.TabActivity;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.TabHost;

public class Coupon extends TabActivity {
	TabHost mTab;
	
	public void onCreate(Bundle savedInstanceState) {
        
		super.onCreate(savedInstanceState);
	
        mTab = getTabHost();
       
        LayoutInflater inflater = LayoutInflater.from(this);
        inflater.inflate(R.layout.coupon_main, mTab.getTabContentView(), true);
        
        
        mTab.addTab(mTab.newTabSpec("tag").setIndicator("서울").setContent(R.id.listview01));
        mTab.addTab(mTab.newTabSpec("tag1").setIndicator("부산,경남").setContent(R.id.listview02));
        mTab.addTab(mTab.newTabSpec("tag2").setIndicator("대구,경북").setContent(R.id.listview03));
        
        
        ListView lv01 = (ListView)findViewById(R.id.listview01);
        ListView lv02 = (ListView)findViewById(R.id.listview02);
        ListView lv03 = (ListView)findViewById(R.id.listview03);
        
       
        ArrayAdapter<CharSequence> arrAdap01 = ArrayAdapter.createFromResource(this, R.array.select01, android.R.layout.simple_list_item_1);
        lv01.setAdapter(arrAdap01);
        
        ArrayAdapter<CharSequence> arrAdap02 = ArrayAdapter.createFromResource(this, R.array.select02, android.R.layout.simple_list_item_1);
        lv02.setAdapter(arrAdap02);
        
        ArrayAdapter<CharSequence> arrAdap03 = ArrayAdapter.createFromResource(this, R.array.select03, android.R.layout.simple_list_item_1);
        lv03.setAdapter(arrAdap03);
        
        lv01.setOnItemClickListener(new ItemClick());
        lv02.setOnItemClickListener(new ItemClick2());
        lv03.setOnItemClickListener(new ItemClick3());
        
    }
}
	

	
	